package com.zsx.shopping.common.enums;

import lombok.Getter;

public enum CodeMsg {

    SUCCESS(200, "success"),

    ERROR(500, "error"),

    FAIL(0, ""),

    BUSY(101, "业务繁忙,请稍后再试"),

    INVALID_PARAM(102, "无效参数"),

    NO_PERMISSION(103, "权限不足,请联系管理员"),

    USER_NOT_LOGIN(104, "登录状态无效");

    @Getter
    private Integer code;

    @Getter
    private String msg;

    CodeMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "CodeMsg{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
